#include <p18f4550.h>
#include <delays.h>
#include <xc.h>

#pragma config PLLDIV=5 // as ext osc is of 20 Mhz
#pragma config FOSC=HSPLL_HS // High Speed Mode
#pragma config CPUDIV=OSC1_PLL2 // CPU Works @ 48Mhz
#pragma config USBDIV = 2 // USB Full Mode
#pragma config PWRT = ON // Power on Timer Reset Enabled
#pragma config BOR = OFF // BOR Disabled
#pragma config BORV = 0 // As BOR is off, this is not relevant
#pragma config MCLRE = ON // MCLE Works as Reset S/W
#pragma config STVREN = OFF // Stack Errors wont reset the controller
#pragma config FCMEN = OFF // fail safe clock wont cause reset
#pragma config WDT = OFF //WDT Off
#pragma config IESO = OFF 
#pragma config WDTPS = 32768 // not relevant as WDT Off
#pragma config PBADEN = OFF 
#pragma config ICPRT = OFF // 40pin IC so cleared
#pragma config VREGEN = OFF
#pragma config CCP2MX = ON
#pragma config LPT1OSC = OFF
#pragma config LVP=OFF
#pragma config XINST = OFF
#pragma config CP0=OFF
#pragma config CP1=OFF
#pragma config CP2=OFF
#pragma config CP3=OFF
#pragma config CPB=OFF
#pragma config CPD=OFF
#pragma config WRT0=OFF
#pragma config WRT1=OFF
#pragma config WRT2=OFF
#pragma config WRT3=OFF
#pragma config WRTB=OFF
#pragma config WRTD=OFF
#pragma config EBTR0=OFF
#pragma config EBTR1=OFF
#pragma config EBTR2=OFF
#pragma config EBTR3=OFF
#pragma config EBTRB=OFF
#define  _XTAL_FREQ	48000000 